import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import 'vant/lib/index.css'
import *as Vant from 'vant'

import { Tabbar, TabbarItem,Dialog,Notify } from 'vant';



import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'


const app = createApp(App);
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
	app.component(key, component)
}

export const addResizeListener = function(element, fn) {
	if (isServer) return;
	if (!element.__resizeListeners__) {
		element.__resizeListeners__ = [];
		element.__ro__ = new ResizeObserver(debounce(16, resizeHandler));
		element.__ro__.observe(element);
	}
	element.__resizeListeners__.push(fn);
};



import echarts from './echarts.js'

// 挂载到vue实例中
// Vue.prototype.$echarts = echarts;//vue2的挂载方式
app.config.globalProperties.$echarts = echarts;//vue3的挂载方式

app.use(router);
app.use(store);
app.use(Tabbar,TabbarItem,Dialog,Notify);
app.use(Vant);
app.use(ElementPlus)



app.mount('#app');
